<div class="row">
    <div class="col-lg-12 col-md-12 col-xs-12"
        ba-panel
        ba-panel-title="设备地图"
        ba-panel-class="map-panel feed-comply-panel with-scroll todo-panel">
        <div id="bmap-con" style="height: 330px;"></div>
    </div>
    <div class="col-lg-12 col-md-12 col-sm-12" ba-panel ba-panel-title="设备中心" ba-panel-class="custom-panel with-scroll light-text">
        <div class="row add-row-editable-table">
            <div class="col-md-4">
                <button has-perms='pdev.device.add' ng-show="!kt.isShowAddBtn" class="btn btn-success btn-with-icon" ui-sref="pdev.device.add({id:kt.device.id,isAdd:true})">
                <i class="ion-plus-round"></i>新增
                </button>
            </div>
            <div class="col-md-2 col-md-offset-6 ">
                <div class="form-group">
                    <input type="text" class="form-control form-control-rounded" ng-model="kt.tableState.search.name"
                    input-keyup="kt.LoadPage" placeholder="设备名称">
                </div>
            </div>
        </div>
        <table class="table table-bordered table-hover table-condensed" st-pipe="kt.LoadPage" st-table="devicelist">
            <thead>
                <tr class="sortable">
                    <th>
                        <label class="table-checkbox checkbox-inline custom-checkbox nowrap">
                            <input type="checkbox" ng-model="kt.checkboxes.checked">
                            <span></span>
                        </label>
                    </th>
                    <th>编号</th>
                    <th>设备名称</th>
                    <th>设备UID</th>
                    <th>设备地址</th>
                    <th>设备类型</th>
                    <th>经度</th>
                    <th>纬度</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="device in kt.devicelist" class="editable-row">
                    <td class="check-td">
                        <div class="mail-checkbox">
                            <label class="checkbox-inline custom-checkbox nowrap">
                                <input type="checkbox" ng-model="kt.checkboxes.items[device.id]">
                                <span></span>
                            </label>
                        </div>
                        <div ng-show="false">
                            <span e-name="id" e-form="rowform" editable-text="device.id">
                            </span>
                        </div>
                    </td>
                    <td>{{$index+1}}</td>
                    <td>{{device.name}}</td>
                    <td>{{device.deviceUid}}</td>
                    <td>{{device.address}}</td>
                    <td>{{device.type}}</td>
                    <td>{{device.lat}}</td>
                    <td>{{device.lng}}</td>
                    <td>
                        {{kt.getDictLabel('DEV_ONLINE_STATUS', device.isOnline)}}
                    </td>
                    <td>
                        <div class="buttons">
                            <button has-perms='pdev.device.view' class="btn btn-info editable-table-button btn-xs btn-with-icon"
                            ui-sref="pdev.device.view({id:device.id,isView:true})"><i class="ion-search"></i>查看
                            </button>
                            <button has-perms='pdev.device.edit' class="btn btn-warning editable-table-button btn-xs btn-with-icon"
                            ui-sref="pdev.device.edit({id:device.id})"><i class="ion-edit"></i>编辑
                            </button>
                            <button has-perms='pdev.device.delete' class="btn btn-danger editable-table-button btn-xs btn-with-icon"
                            ng-click="kt.del(device.id)"><i class="ion-trash-a"></i>删除
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="10" class="text-center">
                    <div st-pagination="" st-items-by-page="10"
                    st-template="app/pages/common/pagination.html"></div>
                </td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>